const mongoose = require('mongoose');
const Schema = mongoose.Schema;
let ObjectId = Schema.Types.ObjectId;

// 创建图片表
const picSchema = new Schema({
  id: {type: ObjectId},//图片id
  order: String,//图片编号
  goodsId: {type: ObjectId,ref: 'Goods'},//商品id
  url: String,//图片链接
  createAt: {type: Date, default: Date.now},//生成时间
})

mongoose.model('Pic',picSchema);
